import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { Feedback } from 'libs/db/entity/feedback.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { FeedbackCrudOps } from './feedback-crud-ops';
import { FeedbackService } from './feedback.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(FeedbackCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-admin'))
@ApiBearerAuth()
@ApiTags('群众意见建议处理')   //标签
@Controller('feedback')
export class FeedbackController implements CrudController<Feedback> {
  constructor(public service: FeedbackService) {
  }
}
